package com.data4.feignapi.client;

import com.data4.feignapi.dto.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(name = "utils-service")
public interface UtilsClient {
    @GetMapping("/util/info")
    Result getFileStatusInfo(@RequestParam("fileName") String fileName);

    @DeleteMapping("/util/delete")
    Result delete(@RequestParam("fileName") String fileName);

    @PostMapping("/util/upload")
    Result upload(@RequestParam("file") MultipartFile file);
}
